import request from '@/utils/request.js';

export default {
	// 登录
	login(data) {
		return request.post('/auth/login', data, {
			skipAuth: true
		});
	},
	// 刷新token
	refreshToken(data) {
		return request.post('/auth/refresh', data, {
			skipAuth: true
		});
	},
	// 退出登录
	logout() {
		return request.post('/auth/logout', {
			skipAuth: true
		});
	},
	// 注册
	register(data) {
		return request.post('/auth/register', data, {
			skipAuth: true
		});
	},

	// 检查用户名
	checkUsername(username) {
		return request.get('/auth/check-username', {
			username
		});
	},

};
